<template>
    <section class="wenjian_form">
 			<el-form ref="form" :model="wenjianForm" label-width="106px" class="second_form">
 				<el-form-item label="选择文件类型 " required >
 						<el-radio-group v-model="wenjianForm.wenjianType">
						     <el-radio-button class="box-radio"  v-for="(item,index) in wenjianType" :label="item.value">{{item.label}}</el-radio-button>
						</el-radio-group>
 				</el-form-item>
 				
 				<!--<el-form-item label="请求方式 " required >
 						<el-radio-group v-model="wenjianForm.RequestType">
				     		 <el-radio-button class="box-radio"  label="wenjianName">按文件名称</el-radio-button>
				     		  <el-radio-button class="box-radio"  label="time">按时间</el-radio-button>
						</el-radio-group>
 				</el-form-item>
 				-->
 				
 				<el-form-item label="返回数据 " required >
 					<el-checkbox-group v-model="wenjianForm.backData">
					     <el-checkbox-button disabled class="box_checkbox" v-for="(item,index) in backData" :label="item.value" :value="item.value" :key="item.id">{{item.name}}</el-checkbox-button>
					</el-checkbox-group>
 				</el-form-item>
 				
 				<el-form-item label="返回文件地址" required >
 					{{filePath}}
 				</el-form-item>
        	</el-form>
    </section>
</template>

<script>
    
    export default {
    	props:{
    		backData:Array,
    		filePath:'',
    		timeSubmit:Boolean
    	},
        data() {
          return {
          	wenjianForm:{
          		wenjianType:'',
          		RequestType:'',
          		backData:[],
          	},
          	wenjianType:[
          		{
          			label:'XML',
          			value:'xml'
          		},
          		{
          			label:'CSV',
          			value:'csv'
          		},
          		{
          			label:'JSON',
          			value:'json'
          		},
          		{
          			label:'TXT',
          			value:'txt'
          		}
          	],
    
          };
        },
        methods: {
        
        },
        watch:{
        	timeSubmit(newVal){
        		this.$emit("outPutForm",this.wenjianForm.wenjianType);
        	}
        }
  };
</script>

<style>
    .wenjian_form  .box-radio{
    	margin: 5px !important;
    }
    .wenjian_form  .box-radio .el-radio-button__inner{
    	border:  1px solid #dcdfe6;
    }
    
  .wenjian_form .el-radio-button__orig-radio:checked+.el-radio-button__inner{
  		color: #fff;
	    background-color: #409eff;
	    border-color: #409eff;
	    box-shadow: unset;
  }
  
    .wenjian_form  .box_checkbox{
    	margin: 5px !important;
    }
    .wenjian_form  .box_checkbox .el-checkbox-button__inner{
    	border:  1px solid #dcdfe6;
    }
    
   .wenjian_form  .el-checkbox-button.is-checked .el-checkbox-button__inner{
	   	color: #fff;
	    background-color: #409eff;
	    border-color: #409eff;
	    box-shadow: -1px 0 0 0 #8cc5ff;
   }
</style>